/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include  <errno.h>
#include <ctype.h>

#include "sys.h"
#include "i2c.h"
//#include "iwdg.h"
#include "spi.h"
#include "tim.h"
#include "usart.h"
#include "gpio.h"
#include "memory.h"

#include "w5500_init.h"
#include "w5500_udp.h"
#include "httputil.h"
#include "http_server.h"

#include "eapol.h"


#include "task_ethernet.h"
#include "task_rs485.h"


/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define INPUT_3_Pin GPIO_PIN_13
#define INPUT_3_GPIO_Port GPIOC
#define INPUT_4_Pin GPIO_PIN_14
#define INPUT_4_GPIO_Port GPIOC
#define BUZZER_Pin GPIO_PIN_15
#define BUZZER_GPIO_Port GPIOC
#define OUTPUT_6_Pin GPIO_PIN_1
#define OUTPUT_6_GPIO_Port GPIOA
#define OUTPUT_5_Pin GPIO_PIN_2
#define OUTPUT_5_GPIO_Port GPIOA
#define INPUT_2_Pin GPIO_PIN_3
#define INPUT_2_GPIO_Port GPIOA
#define INPUT_1_Pin GPIO_PIN_0
#define INPUT_1_GPIO_Port GPIOB
#define DHT11_Pin GPIO_PIN_2
#define DHT11_GPIO_Port GPIOB
#define STAVS_LED_Pin GPIO_PIN_12
#define STAVS_LED_GPIO_Port GPIOB
#define OUTPUT_3_Pin GPIO_PIN_13
#define OUTPUT_3_GPIO_Port GPIOB
#define OUTPUT_4_Pin GPIO_PIN_14
#define OUTPUT_4_GPIO_Port GPIOB
#define IIC_SCL_Pin GPIO_PIN_15
#define IIC_SCL_GPIO_Port GPIOB
#define IIC_SDA_Pin GPIO_PIN_8
#define IIC_SDA_GPIO_Port GPIOA
#define RS485EN_Pin GPIO_PIN_11
#define RS485EN_GPIO_Port GPIOA
#define OUTPUT_2_Pin GPIO_PIN_12
#define OUTPUT_2_GPIO_Port GPIOA
#define OUTPUT_1_Pin GPIO_PIN_5
#define OUTPUT_1_GPIO_Port GPIOB
#define INPUT_5_Pin GPIO_PIN_6
#define INPUT_5_GPIO_Port GPIOB
#define INPUT_6_Pin GPIO_PIN_7
#define INPUT_6_GPIO_Port GPIOB
#define W5500_SCS_Pin GPIO_PIN_8
#define W5500_SCS_GPIO_Port GPIOB
#define W5500_RST_Pin GPIO_PIN_9
#define W5500_RST_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
